package cn.edu.just.firstjavaapp.I9;

import cn.edu.just.firstjavaapp.l8.Person;

public class ObjectDemo {
    public static void main(String[] args) throws CloneNotSupportedException {
        Person p = new Person("张三",19);
        Person p2 = (Person)p.clone();
        Person p3 = p;
        p2.print();
        System.out.println(p == p2);
        System.out.println(p.equals(p2));
        System.out.println(p == p3);
    }
}
